﻿<local:DocumentBase x:Class="WPFExcelReport.JLTFDAILY"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>        
        <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
            <WrapPanel Width="Auto">
                <Label Content="花型号："    Width="Auto" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtART" Width="115" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="1"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="检验员："    Width="Auto" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTAFF" Width="70" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="检验日期从" Height="30" HorizontalAlignment="Left" Margin="10,0,0,0" Name="label3" VerticalAlignment="Top" Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="130" />
                <TextBox Name="txtSTARTTIME" Width="29" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="5"
                         Text="00" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="到" Height="28" HorizontalAlignment="Left" Margin="5,0,0,0" Name="label4" VerticalAlignment="Top" Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0" Name="END_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="6"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="126" />
                <TextBox Name="txtENDTIME" Width="31" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="7" 
                         Text="24" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="64" Panel.ZIndex="8"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="65" Panel.ZIndex="9"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0" Margin="0,5,0,0">            
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="11"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" IsReadOnly="True"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               >
                    <!--ART	COLOR	WBEWBUCHDAT	USERID	MACHINE	AMTR	BMTR	CMTR TMTR-->
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WBEWBUCHDAT}" Header="成品检验日期" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=TT}" Header="时间" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=USERID}" Header="成品验布人员" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=MACHINE}" Header="成品验布机" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="花型号" Width="SizeToCells" MinWidth="45" />
                        <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="颜色" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=AQTY}" Header="一等库存" Width="SizeToCells" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=BQTY}" Header="二等库存" Width="SizeToCells" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=QTY}" Header="车间产量" Width="SizeToCells" MinWidth="45" />
                    <DataGridTextColumn Binding="{Binding Path=AMTR}" Header="一等" Width="SizeToCells" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=BMTR}" Header="二等" Width="SizeToCells" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=CMTR}" Header="零疵布" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=DCMTR}" Header="待处理" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=HXMTR}" Header="回修" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=XDMTR}" Header="＜20米" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=TTMTR}" Header="个人产量" Width="SizeToCells" MinWidth="50" /> 
                    </DataGrid.Columns>
                </DataGrid>
        </Grid>
    </Grid>
</local:DocumentBase>
